import Router from 'vue-router'
import Vue from 'vue'

import Login from '@/pages/login/index.vue'
import Layout from '@/pages/layout/index.vue'
import Message from "@/pages/message/index.vue"
import Realese from '@/pages/release/index.vue'
import Register from '@/pages/register/index.vue'

Vue.use(Router)

export default new Router({
	routes:[
		{
			path: '/',
			name: 'init',
			redirect: '/login',
			meta:{
				title: '登录'
			}
		},
		{
			path: '/login',
			name: 'login',
			component: Login,
			meta:{
				title: '登录'
			}
		},
		{
			path: '/register',
			name: 'register',
			component: Register
		},
		{
			path: '/layout',
			name: 'layout',
			component: Layout,
			meta: {
				title: '首页'
			},
			children:[
				{
					path: 'message',
					component: Message
				},
				{
					path: 'realse',
					component: Realese
				},
			]
		}
			
		
	]
})